package es.ats.codington.festival.interfaces.daos;

import java.util.Date;
import java.util.List;

import es.ats.codington.festival.domain.Event;
import es.ats.codington.festival.exceptions.DAOException;

public interface IEventDAO {
	
	/**
     * This method selects an event in relation with his id from the database.
     * 
     * @param eventId the id of the event.
     * @return The Event with the id eventId selected from the database.
     */
    public Event getEventById(int eventId) throws DAOException;

    /**
     * This method inserts new event in the database.
     * 
     * @param event The Event to be updated.
     * @return Number of rows affected.
     */
    public int insertEvent(Event event) throws DAOException;

    /**
     * This method deletes an event in relation with his id from the database.
     * 
     * @param eventId eventId the id of the event.
     * @return Number of rows affected.
     */
    public int deleteEventById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int checkEventSeatsAvailableById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public String checkEventNameById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public String checkEventDescriptionById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public Date checkEventStartById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int checkEventDurationById(int eventId) throws DAOException;
        
    /**
     * Falta doc!!
     */
    public Float checkEventPriceById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int checkEventPlaceById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int checkPhotoById(int eventId) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventNameById(int eventId, String name) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventDescriptionById(int eventId, String description) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventStartById(int eventId, Date start) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventDurationById(int eventId, int duration) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventPriceById(int eventId, Float price) throws DAOException;
    
    /**
     * Falta doc!!
     */
    public int updateEventPlaceById(int eventId, int placeId) throws DAOException;
    
    /**
     * This method selects a list with all events from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getAllEvents() throws DAOException;
    
    /**
     * This method selects a list of events in relation with their name from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getEventsByName(String eventName) throws DAOException;
    
    /**
     * This method selects a list of events in relation with their description from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getEventsByDescription(String description) throws DAOException;
    
    /**
     * This method selects a list of events in relation with their name or description from the database.
     * 
     * @param s String to be searched in the name or description of the event.
     * @return List of Events that have s in their name or description.
     */
    public List<Event> getEventsByNameOrDescription(String s) throws DAOException;
    /**
     * This method selects a list of events in relation with their place id from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getEventsByPlaceId(int placeId) throws DAOException;
    
    /**
     * This method selects a list of events in relation with their place type from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getEventsByPlaceType(int type) throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Large Business from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getBusinessEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Market from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getMarketEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Museum from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getMuseumEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Park from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getParkEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Stadium from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getStadiumEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Theater from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getTheaterEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the Tourist Attraction from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getTouristEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the zoo from the database.
     * 
     * @param eventName The name of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getZooEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at Zone from the database.
     * 
     * @param zone The zone of the event.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getEventsByZone(int zone) throws DAOException;
    
    /**
     * This method selects a list of events that take place at the North from the database.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getNorthEvents() throws DAOException;
    
    /**
     * This method selects a list of events that take place at the South from the database.
     * @return List of Events that have eventName in their names.
     */
    public List<Event> getSouthEvents() throws DAOException;
}
